package aeronef.control.screen;
 
import com.jme3.app.Application;
import com.jme3.app.state.AbstractAppState;
import com.jme3.app.state.AppStateManager;
import de.lessvoid.nifty.Nifty;
import de.lessvoid.nifty.screen.Screen;
import de.lessvoid.nifty.screen.ScreenController;
import aeronef.MainApp;
 
public class HostLobbyScreen extends AbstractAppState implements ScreenController {
 
  private Nifty nifty;
  private Screen screen;
  private MainApp app;
 
  public HostLobbyScreen() { } 
  
  public HostLobbyScreen(String data) { } 
 
  public void bind(Nifty nifty, Screen screen) {
    this.nifty = nifty;
    this.screen = screen;
  }
 
  public void onStartScreen() { }
 
  public void onEndScreen() { }

  @Override
  public void initialize(AppStateManager stateManager, Application app) {
    super.initialize(stateManager, app);
    this.app = (MainApp)app;
  }
 
  @Override
  public void update(float tpf) { }
  
  public void startGame() {
      nifty.removeScreen("host_lobby");
      // loading screen logic.
      app.goToGame();
  }
  
  public void backToMenu() {
      app.startMenu();
  }
  
  public void doNothing() {
      
      
  }
// 
//  @NiftyEventSubscriber(id="planetSlider")
//  public void followPlanetSlider() {
//      Float sliderValue = screen.findNiftyControl("planetSlider", Slider.class).getValue();
//      screen.findNiftyControl("planetCounter", Label.class).setText(sliderValue.toString());
//      String id = screen.findNiftyControl("planetCounter", Label.class).getId();
//      String foo = "bar";
//  }
  
}